import Vue from "vue";
import Router from "vue-router";

import Login from "@/views/login";
import Home from "@/views/home";
import StudentManagement from "@/views/student-management";
import HolidayManagement from "@/views/holiday-management";
import ClassHourManagement from "@/views/class-hour-management";
import AttendanceManagement from "@/views/attendance-management";
import WorkManagement from "@/views/work-management";
import WorkPreview from "@/views/work-preview";
import Statistics from "@/views/statistics";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      name: "login",
      component: Login
    },
    {
      path: "/home",
      component: Home,
      children: [
        {
          path: "students",
          component: StudentManagement
        },
        {
          path: "holidays",
          component: HolidayManagement
        },
        {
          path: "class-hours",
          component: ClassHourManagement
        },
        {
          path: "attendances",
          component: AttendanceManagement
        },
        {
          path: "works",
          component: WorkManagement
        },
        {
          path: "preview",
          component: WorkPreview
        },
        {
          path: "statistics",
          component: Statistics
        }
      ]
    }
  ]
});
